package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        osw.write("哈哈哈哈哈哈哈哈,");
        osw.write("为什么赚不到钱啊");
        osw.close();
        /*        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter OSW = new OutputStreamWriter(fos, "UTF-8");
        OSW.write("让我掉下眼泪的不是昨夜的酒");
        OSW.write("让我依依不舍的,不止你的温柔");
        OSW.close();*/
    }
}
